function Robot() {
	//=========================机器人数据配置=======================
	//95%
	this.beiLv1 = [1.01, 1.011, 1.012, 1.013, 1.014, 1.015, 1.016, 1.017, 1.018, 1.019, 1.020, 1.03, 1.04, 1.05, 1.06, 1.07, 1.08, 1.09, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 
	              2, 2.01, 2.02, 2.03, 2.04, 2.05, 2.06, 2.07, 2.08, 2.09, 2.1, 2.11, 2.12, 2.13, 2.15, 2.16, 2.17, 2.18, 2.19, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9
	             ];
	//5%
	this.beiLv2 = [3, 3.01, 3.02, 3.03, 3.04, 3.05, 3.06, 3.07, 3.08, 3.09, 3.1, 3.11, 3.12, 3.13, 3.14, 3.15, 3.16, 3.17, 3.18, 3.19, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 
	              4, 4.01, 4.02, 4.03, 5, 6, 6.5, 7, 8, 9, 10, 12, 15, 19
	             ];
	//random
	this.name = ["keive", "foshoshin", "Matt", "lee23", "Chris", "Wondering Coder", "swdev", "Joe Lundy", "Caumons", "jimsis", "Androyds", 
	            "CookieMonster", "sawa", "Rdvsm", "dummy dummy", "aahrens", "Marilou", "fkpwolf", "SeñorPythoniano", "Kim Prince", "professormeowingtons",
	            "sukhvir", "Edwardo", "susan", "kierans", "BrandtCP", "Lsooties", "marsant", "simonzack", "renegade8191", "adit", "medBo", "CommaToast", 
	            "john smith", "maniootek", "John Baum", "earthsmurf", "jason", "Jan Hettich", "Amanda", "Joe Elmore", "Hank Bates", "Suresh Alagar", "narak", 
	            "Brendan Long", "Benson", "Fahimeh", "Sam", "Fahimeh", "eeshwr", "VonnCC", "First Last", "blunatic", "Chris", "Andrew Lee", "interstar", "Matthew", 
	            "Jorge Gil", "chew socks", "Ricky", "Victor Navarro", "ChemCat", "T Treinen", "ajeh", "Wojciech Maj", "dj_segfault", "envinyater", "fluffinmuffin", "DT.DTDG", 
	            "rakeshr", "novavent", "Michael Zaporozhets", "Fabricio Pereira", "RazorProgrammer", "jose sanchez", "mmcglynn", "Jacob Kodner", "stulk", "Greg J", 
	            "Jack", "agconti", "macsplean", "lazynomore", "mtpultz", "Mike", "chrisriesgo", "HappyProgrammer", "Kwa Zheng Yao", "HanssieTeeuwen", "allstar", "Matthew Houston", "Belmark Caday", 
	            "enriqg9", "thecreator232", "snahl", "monotong", "Cliff Mayson", "joverbye", "Casper", "Carla", "Unknownymous", "seba.wagner", "Mehdi", "Rob5tan", "justingordon", "Aaron Shekey", 
	            "lolliloop", "Richie Miz", "knutole", "Ambrose Bwangatto", "HRo", "Emanuel Faisca", "Alex Schneider", "Joe Smith", "Justin C. Wu", "Andrew", "pharaon450", "Chris S", "Kevin McFadden", 
	            "Tom Hanson", "Deltics", "Buck925", "Anthony", "Mike", "Tony", "L.J.W", "Josh Hamet", "Ben Scarberry", "Masti"
	           ];
	//94%
	this.betSize1 = [0.0000001, 0.0000002, 0.000001];
	//4%
	this.betSize2 = [0.0000002, 0.0000003, 0.0000004, 0.0000005, 0.0000006, 0.0000007, 0.0000008, 0.0000009, 0.0000011, 0.0000012, 0.0000013, 0.0000014, 
	                0.0000015, 0.0000016, 0.0000017, 0.0000018, 0.0000019, 0.000002, 0.0000021, 0.0000022, 0.0000023, 0.0000024, 0.0000025, 0.0000026, 
	                0.0000027, 0.000003, 0.00000335, 0.00000389, 0.000004, 0.0000041, 0.0000042, 0.0000043, 0.0000044, 0.0000045, 0.0000046, 0.0000047, 
	                0.0000048, 0.0000049, 0.000005, 0.0015313, 0.00005, 0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007];
	//2%
	this.betSize3 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19];
	
}
exports.Robot = Robot;

Robot.prototype.rd = function(n,m){
	 var c = m-n+1;       
	 return Math.floor(Math.random() * c + n); };

Robot.prototype.getBeiLv = function(){
	var rr = this.rd(0, 100);
	if(rr <= 95){
		return parseFloat(this.beiLv1[this.rd(0, this.beiLv1.length-1)].toString()).toFixed(8);
	}else{
		return parseFloat(this.beiLv2[this.rd(0, this.beiLv2.length-1)].toString()).toFixed(8);
	}
};
Robot.prototype.getBetSize = function(){
	var rr = this.rd(0, 100);
	if(rr > 6){
		return parseFloat(this.betSize1[this.rd(0, this.betSize1.length-1)].toString()).toFixed(8);
	}else{
		if(rr > 2){
			return parseFloat(this.betSize2[this.rd(0, this.betSize2.length-1)].toString()).toFixed(8);
		}else{
			return parseFloat(this.betSize3[this.rd(0, this.betSize3.length-1)].toString()).toFixed(8);
		}
	}
};
Robot.prototype.getName = function (){
	return this.name[this.rd(0, this.name.length-1)];
};

Robot.prototype.numAdd = function(num1, num2) {
	var baseNum, baseNum1, baseNum2;
	try {
		baseNum1 = num1.toString().split(".")[1].length;
	} catch (e) {
		baseNum1 = 0;
	}
	try {
		baseNum2 = num2.toString().split(".")[1].length;
	} catch (e) {
		baseNum2 = 0;
	}
	baseNum = Math.pow(10, Math.max(baseNum1, baseNum2));
	return parseFloat(((num1 * baseNum + num2 * baseNum) / baseNum).toString()).toFixed(8);
};
Robot.prototype.numSub = function(num1, num2) {
	var baseNum, baseNum1, baseNum2;
	try {
		baseNum1 = num1.toString().split(".")[1].length;
	} catch (e) {
		baseNum1 = 0;
	}
	try {
		baseNum2 = num2.toString().split(".")[1].length;
	} catch (e) {
		baseNum2 = 0;
	}
	baseNum = Math.pow(10, Math.max(baseNum1, baseNum2));
	return ((num1 * baseNum - num2 * baseNum) / baseNum).toFixed(8);
};
Robot.prototype.numMulti = function(num1, num2) {
	var baseNum = 0;
	try {
		baseNum += num1.toString().split(".")[1].length;
	} catch (e) {
	}
	try {
		baseNum += num2.toString().split(".")[1].length;
	} catch (e) {
	}
	return (Number(num1.toString().replace(".", "")) * Number(num2.toString().replace(".", "")) / Math.pow(10, baseNum)).toFixed(8);
};
Robot.prototype.numDiv = function(num1, num2) {
	var baseNum1 = 0, baseNum2 = 0;
	var baseNum3, baseNum4;
	try {
		baseNum1 = num1.toString().split(".")[1].length;
	} catch (e) {
		baseNum1 = 0;
	}
	try {
		baseNum2 = num2.toString().split(".")[1].length;
	} catch (e) {
		baseNum2 = 0;
	}
	with (Math) {
		baseNum3 = Number(num1.toString().replace(".", ""));
		baseNum4 = Number(num2.toString().replace(".", ""));
		return ((baseNum3 / baseNum4) * pow(10, baseNum2 - baseNum1)).toFixed(8);
	}
};
Robot.prototype.getType = function(){
	var rr = this.rd(0, 100);
	if(rr > 50)return 0;
	return 1;
};